package br.edu.fapi.gestao.pg.repositorio.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ProvedorConexaoMysql {

	private final String CLASS_NAME =  "com.mysql.jdbc.Driver";
	private final String USER = "root";
	private final String PASSWORD = "root";
	private final String URL = "jdbc:mysql://localhost/db_fapifileuploader";
	
	private Connection connection;
	
	public Connection getConnection() {
		try {
			Class.forName(CLASS_NAME);
			connection = DriverManager.getConnection(URL,USER,PASSWORD);
		}catch (ClassNotFoundException e) {
			e.printStackTrace();
		} 
		catch (SQLException e) {
			e.printStackTrace();
		}
		return connection;
	}
	
}
